//
//  BaseNavigationVC.swift
//  newSwift
//
//  Created by MAC on 2023/10/18.
//

import UIKit

class BaseNavigationVC : UINavigationController{
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    /// 重写push方法
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        if (viewControllers.count > 0) {
            viewController.hidesBottomBarWhenPushed = true
            if let vc = viewController as? BaseViewController {
//                vc.barItem.leftBarButtonItem = prepareBackButton()
            } else {
//                viewController.navigationItem.leftBarButtonItem = prepareBackButton()
            }
        }
        
        super.pushViewController(viewController, animated: animated)
    }
    
    
}
